﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="Edit.ascx.vb" Inherits="Control_Hinhdo_Edit" %>

 <script type="text/javascript" >
    function ajaxJquery() { 
     $(function () {
         $(".TextBox:first").focus();
         //Upload Image
         $('#file_upload').uploadify({
             'uploader': '<%=ResolveUrl("~/uploadify/uploadify.swf")%>',
             'script': '<%=ResolveUrl("~/uploadify/Upload.ashx?folder=ImageStorage")%>',
             'cancelImg': '<%=ResolveUrl("~/uploadify/cancel.png")%>',
             'folder': '<%=ResolveUrl("~/Uploads")%>',
             'auto': false,
             'multi': false,
             'fileExt': '*.jpg;*.gif;*.png;*.jpeg;*.bmp',
             'fileDesc': 'Web Image Files (.JPG, .GIF, .PNG , .JPEG , .BMP)',
             'fileDataName': 'myfile',
             'sizeLimit': '<%= ConfigurationManager.AppSettings("maxupload") %>',
             'onComplete': function (event, ID, fileObj, response, data) {
                 $('#<%=hidImagePath.ClientID %>').val('<%= ConfigurationManager.AppSettings("ImageDomain") %>' + response);
                 $('#<%=imgUpload.ClientID %>').attr("src", '<%= ConfigurationManager.AppSettings("ImageDomain") %>' + response);
             }
         });

         $('#file_upload2').uploadify({
             'uploader': '<%=ResolveUrl("~/uploadify/uploadify.swf")%>',
             'script': '<%=ResolveUrl("~/uploadify/Upload.ashx?folder=ImageStorage")%>',
             'cancelImg': '<%=ResolveUrl("~/uploadify/cancel.png")%>',
             'folder': '<%=ResolveUrl("~/Uploads")%>',
             'auto': false,
             'multi': false,
             'fileExt': '*.jpg;*.gif;*.png;*.jpeg;*.bmp',
             'fileDesc': 'Web Image Files (.JPG, .GIF, .PNG , .JPEG , .BMP)',
             'fileDataName': 'myfile',
             'sizeLimit': '<%= ConfigurationManager.AppSettings("maxupload") %>',
             'onComplete': function (event, ID, fileObj, response, data) {
                 $('#<%=hidImagePathNone.ClientID %>').val('<%= ConfigurationManager.AppSettings("ImageDomain") %>' + response);
                 $('#<%=imgUploadNone.ClientID %>').attr("src", '<%= ConfigurationManager.AppSettings("ImageDomain") %>' + response);
             }
         });

     });
 }
</script>
<asp:UpdatePanel ID="uplEditHinhdo" runat="server">
<ContentTemplate>
<div  class="BoxField">
    <div class="HeadTitle">
         <h3>
            <asp:Label ID="Label3" runat="server" Text="CẬP NHẬT DANH MỤC HÌNH ĐỒ" /></h3>
     </div>
   <div class="DivRequired">
       <span class="fieldRequired">&nbsp;</span>Trường yêu cầu nhập dữ liệu
   </div>
   <div class="Error">
      <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="#FF3300" />
  </div>
		<div class="DivRow">
		<div  class="DivLabel">
			<asp:Label ID="lblHinhdocode" CssClass="TextLabel" runat="server" Text="Code:" /><span class="fieldRequired">&nbsp;</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtHinhdocode"
                Display="None" ErrorMessage="Vui lòng nhập code hình đồ" SetFocusOnError="True" />
		</div>
		<div  class="DivTextBox" >
			<asp:TextBox ID="txtHinhdocode" CssClass="TextBox" runat="server" Text="" />
		</div>
		</div>
		<div class="DivRow">
		<div  class="DivLabel">
			<asp:Label ID="lblTengoi" CssClass="TextLabel" runat="server" Text="Tên gọi:" /><span class="fieldRequired">&nbsp;</span>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtTengoi"
                Display="None" ErrorMessage="Vui lòng nhập tên gọi" SetFocusOnError="True" />
		</div>
		<div  class="DivTextBox" >
			<asp:TextBox ID="txtTengoi" CssClass="TextBox" runat="server" Text="" />
		</div>
		</div>
		<div class="DivRow">
		<div  class="DivLabel">
			<asp:Label ID="lblDactinh" CssClass="TextLabel" runat="server" Text="Đặc tính:" /><span class="fieldRequired">&nbsp;</span>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtDactinh"
                Display="None" ErrorMessage="Vui lòng nhập đặc tính" SetFocusOnError="True" />
		</div>
		<div  class="DivTextBox" >
			<asp:TextBox ID="txtDactinh" CssClass="TextArea" runat="server" Text="" TextMode="MultiLine" MaxLength="200" />
		</div>
		</div>
		<div class="DivRow">
		<div  class="DivLabel">
			<asp:Label ID="lblLoaiid" CssClass="TextLabel" runat="server" Text="Loại:" /><span class="fieldRequired">&nbsp;</span>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="ddlLoai"
                Display="None" ErrorMessage="Vui lòng chọn loại" SetFocusOnError="True" />
		</div>
		<div  class="DivTextBox" >
			<asp:DropDownList ID="ddlLoai" runat="server"  CssClass="DropDownList"></asp:DropDownList>
		</div>
		</div>
		<div class="DivRow">
		<div  class="DivLabel">

			<asp:Label ID="lblNgonnguid" CssClass="TextLabel" runat="server" Text="Ngôn ngữ:" /><span class="fieldRequired">&nbsp;</span>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="ddlNgonngu"
                Display="None" ErrorMessage="Vui lòng chọn ngôn ngữ" SetFocusOnError="True" />
		</div>
		<div  class="DivTextBox" >
			
            <asp:DropDownList ID="ddlNgonngu" runat="server"  CssClass="DropDownList" >
                    </asp:DropDownList>
		</div>
		</div>

            <div class="DivRow">
                <div class="DivLabel">
                    <asp:Label ID="Label1" CssClass="TextLabel" runat="server" Text="Picture:" /><span class="fieldRequired">&nbsp;</span>
                    
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="hidImagePath"
                        Display="None" ErrorMessage="Vui lòng chọn hình upload."></asp:RequiredFieldValidator>
                </div>
                <div class="DivTextBox">
                    <input id="file_upload" name="file_upload" type="file" />
                     <a id="upload" href="javascript:$('#file_upload').uploadifyUpload();">Upload Files</a>

                </div>
            </div>
            <div class="DivRow">
                <div class="DivLabel">
                    &nbsp;</div>
                <div style="height: 100px;" class="DivTextBox">
                    <asp:Image ID="imgUpload" runat="server" BorderWidth="0px" Height="100px" Width="100px"
                        ImageUrl="~/Images/NoPhotoAvailable.jpg" />
                </div>
            </div>
            <div class="DivRow">
                <div class="DivLabel">
                    <asp:Label ID="Label2" CssClass="TextLabel" runat="server" Text="Picture None Edge:" /><span class="fieldRequired">&nbsp;</span>
                    
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="hidImagePathNone"
                        Display="None" ErrorMessage="Vui lòng chọn hình none edge upload."></asp:RequiredFieldValidator>
                </div>
                <div class="DivTextBox">
                    <input id="file_upload2" name="file_upload2" type="file" />
                        <a id="upload2" href="javascript:$('#file_upload2').uploadifyUpload();">Upload Files</a>
                </div>
            </div>
            <div class="DivRow">
                <div class="DivLabel">
                    &nbsp;</div>
                <div style="height: 100px;" class="DivTextBox">
                    <asp:Image ID="imgUploadNone" runat="server" BorderWidth="0px" Height="100px" Width="100px"
                        ImageUrl="~/Images/NoPhotoAvailable.jpg" />
                </div>
            </div>

		<div class="DivRow">
		<div class="DivLabel" >&nbsp;&nbsp;&nbsp;</div>
		<div class="DivTextBox" ><div style="float:left" >
			<asp:Button ID="btnSave" runat="server" Text=" Lưu " CssClass="btn" />
			&nbsp;<asp:Button ID="btnSaveAndNew" runat="server" CssClass="btn" Text=" Lưu &amp; Làm mới" />
			&nbsp;<asp:Button ID="btnReset" runat="server" CausesValidation="false" CssClass="btn" Text="Làm lại" /></div><div style=" float:right; text-align: right">
			 &nbsp;<asp:ImageButton ID="btnBack" ImageAlign ="AbsMiddle" ToolTip="Quay lại" runat="server" ImageUrl="~/images/back.png" /></div>
		</div>
		</div>

</div>
<div style="display: none">
<asp:HiddenField ID="hidID" Value="0" runat="server" />
 <asp:TextBox ID="hidImagePath" Text="" runat="server" />
 <asp:TextBox ID="hidImagePathNone" Text="" runat="server" />
</div>
</ContentTemplate>
</asp:UpdatePanel>